package com.project.thisDatabase.base.service;

import com.project.thisDatabase.base.model.DBEntity;
import com.project.thisDatabase.base.model.EntityBase;
import com.project.thisDatabase.base.model.EntityPageBase;
import com.project.thisDatabase.base.model.data.Condition;
import com.project.thisDatabase.base.model.entities.IntResultEntity;
import com.project.thisDatabase.base.model.entities.PageEntity;


import java.util.List;

public interface ServiceViewInterfaceBase<T extends EntityBase> {

    List<T> search(T entity);
    List<T> searchPage(EntityPageBase<T> entity);
    IntResultEntity count(T entity);


    IntResultEntity countAut(T entity);
    List<T> searchPageAut(EntityPageBase<T> entity);
    List<T> searchAut(T entity);

    <U> List<T> search(Condition<U> item) throws Exception;
    <U> List<T> search(Condition<U> item, PageEntity page) throws Exception;
    <U> List<T> search(String[] cols, Condition<U> item, PageEntity page) throws Exception;

}
